package com.bytz.modules.cms.order.model;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.bytz.common.aspect.annotation.Dict;
import com.bytz.common.entity.annotation.MPJFieldMapping;
import com.bytz.modules.cms.common.excel.ExcelDictConvert;
import com.bytz.modules.cms.order.entity.Order;
import com.bytz.modules.cms.order.entity.OrderPay;
import com.bytz.modules.cms.order.entity.OrderPayDetail;
import com.bytz.modules.cms.reseller.entity.Reseller;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper = true)
public class OrderBill extends OrderPayDetail {

    @ApiModelProperty("经销商id")
    @MPJFieldMapping(entityClass = Order.class)
    private String resellerId;

    @ExcelProperty("经销商名")
    @ApiModelProperty("经销商名")
    @MPJFieldMapping(entityClass = Reseller.class)
    private String resellerName;

    @ExcelProperty("需方订单号")
    @ApiModelProperty(value = "需方订单号")
    @MPJFieldMapping(entityClass = Order.class)
    private String orderNumber;

    @ExcelProperty("合同号")
    @ApiModelProperty(value = "合同号")
    @MPJFieldMapping(entityClass = Order.class)
    private String contractNumber;

    @ExcelProperty(value = "订单状态", converter = ExcelDictConvert.class)
    @ApiModelProperty("订单状态")
    @Dict(dicCode = "mall_order_status")
    @MPJFieldMapping(entityClass = Order.class, propertyName = "status")
    private String orderStatus;

    @ExcelProperty(value = "付款类别", converter = ExcelDictConvert.class)
    @ApiModelProperty(value = "付款类别（1-预付款；2-尾款）")
    @MPJFieldMapping(entityClass = OrderPay.class)
    @Dict(dicCode = "mall_order_pay_type")
    private String payType;

    @ApiModelProperty(value = "销售人员ID")
    @MPJFieldMapping(entityClass = Order.class)
    private String salesId;

    @ExcelProperty("销售")
    @ApiModelProperty(value = "销售人员名字 (供方委托代理人)")
    @MPJFieldMapping(entityClass = Order.class)
    private String salesName;

    @ExcelProperty("销售外部编号")
    @ApiModelProperty(value = "销售外部编号")
    @MPJFieldMapping(entityClass = Order.class)
    private String salesExternalId;

    @ExcelProperty(value = "支付状态", converter = ExcelDictConvert.class)
    @ApiModelProperty("支付状态")
    @Dict(dicCode = "mall_order_pay_status")
    private String payStatus;

    @ExcelProperty("需方客户编码")
    @ApiModelProperty(value = "需方客户编码")
    @MPJFieldMapping(entityClass = Order.class)
    private String demanderNumber;

    @ExcelProperty("需方单位名称")
    @ApiModelProperty(value = "需方单位名称")
    @MPJFieldMapping(entityClass = Order.class)
    private String demanderName;
}
